package org.apache.lucene.store;

public class GAELuceneConstants {

	/**
	 * This is the entity kind that GAELucene will use when
	 * it creates an entity. Root entity and child entities
	 * will both use this constant.
	 */
	public static final String entityKind = "LuceneFiles";
	
	/**
	 * This is the block size we will use for storing the
	 * data in the DataStore blobs.
	 */
	public static final int blockSize = 1024;
	
	/**
	 * This is the maximum number of blocks we can store
	 * in a single entity, across any number of blobs.
	 */
	public static final int maxEntityBlocks = 984;
	
	/**
	 * Maximum size we are going to allow a blob to be.
	 * This should fit in an entity and allow enough room for 
	 * the necessary meta-data.
	 */
	public static final int maxBlobSize = blockSize * maxEntityBlocks;
	
	/**
	 * Property name that indicates which version of the directory
	 * this is. This property should only be applied to the top
	 * most entity in the entity group.
	 */
	public static final String versionPropertyName = "version";
	
	/**
	 * Property name that indicates how many files are stored
	 * in this directory, used to have reader know how many
	 * f*# properties there are supposed to be.
	 */
	public static final String fileCountPropertyName = "files";
	
	/**
	 * Property name prefix for properties that contain a filename
	 * This is only stored on the directoryEntity
	 */
	public static final String fileNamePropertyPrefixName = "fn";
	
	/**
	 * Property name prefix for properties that contain the number of
	 * entities that this file was split across.
	 * 
	 * The format of the property name is flrc#
	 */
	public static final String fileLocationReferenceCountPrefixName = "flrc";
	
	/**
	 * Property name prefix for properties that contain the keys
	 * to entities where the file section is located.
	 * 
	 * The format of the property name is flre#_#
	 */
	public static final String fileLocationReferenceEntityPrefixName = "flre";
	
	/**
	 * Property name prefix for properties that contain the size
	 * of blob that will be found in the entity with the same reference number.
	 * 
	 * The format of the property name is flrss#_#
	 */
	public static final String fileLocationReferenceSectionSizePrefixName = "flrss";
	
	/**
	 * Property name prefix for properties that contain the actual file data contained within a blob
	 */
	public static final String fileBlobPropertyPrefixName = "fb";
	
	/**
	 * Property name prefix for properties that contain the actual file modification date.
	 * The format is a epoch based long value.
	 */
	public static final String fileLastModifyDatePrefixName = "flmd";
	
	/**
	 * Property name prefix for properties that contain the length
	 * of the complete file.
	 */
	public static final String fileLengthPrefixName = "fl";
	
	/**
	 * Property name for boolean flag that indicates
	 * if the directory data is stored entities other
	 * than that directory entity. 
	 * 
	 * True = Other entities contain information
	 * False = Directory contains all information
	 */
	public static final String directorySpansEntities = "dse";
	
	/**
	 * Property name for Set that contains the keys
	 * for other entities containing the directory data.
	 */
	public static final String directoryEntities = "de";
	
}
